[qemu] Move acpi to devfn 2, so that it matches the fadt.
authorchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Wed, 9 Aug 2006 20:33:59 +0000 (21:33 +0100)
committerchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Wed, 9 Aug 2006 20:33:59 +0000 (21:33 +0100)
Based on feedback from: Wang, Winston L <winston.l.wang@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
tools/firmware/acpi/acpi_fadt.h
tools/ioemu/hw/pc.c
tools/ioemu/hw/piix4acpi.c
tools/ioemu/vl.h

index 3c8ef4e25ad6fc0a893d9810eb8271cb3ea50ba0..d1ecea5588b9c8c49f06a6062d17e2b3b34103e3 100644 (file)
@@ -59,8 +59,7 @@
 #define ACPI_PM1A_EVT_BLK_ADDRESS_SPACE_ID  ACPI_SYSTEM_IO
 #define ACPI_PM1A_EVT_BLK_BIT_WIDTH         0x20
 #define ACPI_PM1A_EVT_BLK_BIT_OFFSET        0x00
-//#define ACPI_PM1A_EVT_BLK_ADDRESS           0x000000000000c010
-#define ACPI_PM1A_EVT_BLK_ADDRESS           0x000000000000c040
+#define ACPI_PM1A_EVT_BLK_ADDRESS           0x000000000000c010
 
 //
 // PM1B Event Register Block Generic Address Information
index 70cf09064fb890c2f063fc5a3bc9208dd25f241d..45acc68dda0d8983ec4f9a478c59c545d5a428be 100644 (file)
@@ -572,9 +572,6 @@ static int serial_irq[MAX_SERIAL_PORTS] = { 4, 3, 4, 3 };
 static int parallel_io[MAX_PARALLEL_PORTS] = { 0x378, 0x278, 0x3bc };
 static int parallel_irq[MAX_PARALLEL_PORTS] = { 7, 7, 7 };
 
-/* PIIX4 acpi pci configuration space, func 3 */
-extern void pci_piix4_acpi_init(PCIBus *bus, int devfn);
-
 #ifdef HAS_AUDIO
 static void audio_init (PCIBus *pci_bus)
 {
@@ -877,13 +874,13 @@ static void pc_init1(uint64_t ram_size, int vga_ram_size, int boot_device,
 
     cmos_init(ram_size, boot_device, bs_table, timeoffset);
 
-    if (pci_enabled && usb_enabled) {
-        usb_uhci_init(pci_bus, piix3_devfn + 2);
-    }
-
     /* using PIIX4 acpi model */
     if (pci_enabled && acpi_enabled)
-        pci_piix4_acpi_init(pci_bus, piix3_devfn + (usb_enabled ? 3 : 2));
+        pci_piix4_acpi_init(pci_bus, piix3_devfn + 2);
+
+    if (pci_enabled && usb_enabled) {
+        usb_uhci_init(pci_bus, piix3_devfn + (acpi_enabled ? 3 : 2));
+    }
 
 #ifndef CONFIG_DM
     if (pci_enabled && acpi_enabled) {
index 1426447f9b63c7d0a3815486eeb7bf04639a51a1..7b75d01c6445eeaf7827c43a7821d5cabedfc8a3 100644 (file)
@@ -374,13 +374,13 @@ static void acpi_map(PCIDevice *pci_dev, int region_num,
     register_ioport_read(addr + 8, 4, 4, acpiPm1Timer_readl, d);
 }
 
-/* PIIX4 acpi pci configuration space, func 3 */
+/* PIIX4 acpi pci configuration space, func 2 */
 void pci_piix4_acpi_init(PCIBus *bus, int devfn)
 {
     PCIAcpiState *d;
     uint8_t *pci_conf;
 
-    /* register a function devfn of PIIX4 */
+    /* register a function 2 of PIIX4 */
     d = (PCIAcpiState *)pci_register_device(
         bus, "PIIX4 ACPI", sizeof(PCIAcpiState),
         devfn, NULL, NULL);
index 7ed39bfcf628165b08e2f34f8463c6b1aa74a4ac..37b42e2db2c96b3ceefbd0774f5ce2a1277bf205 100644 (file)
@@ -925,6 +925,9 @@ extern int acpi_enabled;
 void piix4_pm_init(PCIBus *bus, int devfn);
 void acpi_bios_init(void);
 
+/* piix4acpi.c */
+extern void pci_piix4_acpi_init(PCIBus *bus, int devfn);
+
 /* pc.c */
 extern QEMUMachine pc_machine;
 extern QEMUMachine isapc_machine;